package com.example.dealdata.dao.chengyu;

import com.example.dealdata.pojo.chengyu.Chengyu_JL_Key;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ChengyuJLKeyDao extends JpaRepository<Chengyu_JL_Key, Integer> {

    List<Chengyu_JL_Key> findByfkey(String f_key);


    @Query(value = "SELECT * FROM chengyu_jl_key GROUP BY fkey",nativeQuery = true)
    List<Chengyu_JL_Key>  findGroupByfkey();


    @Query(value = "SELECT * FROM chengyu_jl_key WHERE fkey=:f_key AND nextflag=1",nativeQuery = true)
    List<Chengyu_JL_Key> findVialCy(String f_key);
}
